import React from 'react'
import {Routes,Route} from 'react-router-dom'
import Login from './components/Login'
import Home from './components/Home'
import User from './components/home/User'
import Category from './components/home/Category'
import Role from './components/home/Role'
import Product from './components/home/Product'
import Main from './components/Main'
import NotFound from './components/NotFound'
import UserDetail from './components/home/UserDetail'
import UserInfo from './components/home/UserInfo'
export default function App() {
  return (
    <Routes>
      <Route path='/login' element={<Login/>}></Route>
      <Route path='/home' element={<Home/>}>
          <Route index element={<Main/>}></Route>
          <Route path='user' element={<User/>}></Route>
          <Route path='role' element={<Role/>}></Route>
          <Route path='category' element={<Category/>}></Route>
          <Route path='product' element={<Product/>}></Route>
          <Route path='udetail' element={<UserDetail/>}></Route>
          <Route path='uinfo/:id' element={<UserInfo/>}></Route>
          <Route path='*' element={<NotFound></NotFound>}></Route>
      </Route>
      <Route path='*' element={<NotFound></NotFound>}></Route>
    </Routes>
  )
}
